Diagnostics
After you create catalogs
and indexes, you occasionally need to get information about your
catalogs, tables, and indexes. So that you can do this, Microsoft has
supplied the sp_help_fulltext_tables and sp_help_fulltext_columns stored procedures and the system view sys.fulltext_catalogs.
These stored procedures and
view allow you to examine the state of your full-text tables, columns,
and catalogs. Microsoft recommends that rather than using these objects,
you use the OBJECTPROPERTY, COLUMNPROPERTY, and FULLTEXTCATALOGPROPERTY metadata functions. Table 1 lists the full-text index properties for the OBJECTPROPERTY function.
Table 1. Full-Text Index Properties for the OBJECTPROPERTY
Property | Description | Values |
---|
TableFullTextBackgroundUpdateIndexOn | Indicates whether change | 1 = true and 0 = false tracking is enabled. |
TableFulltextCatalogId | Returns the catalog ID of the catalog the full-text index is placed on. | CatalogID or 0 (table not indexed) |
TableFulltextChangeTrackingOn | Enables change tracking. | 1 = true and 0 = false |
TableFulltextDocsProcessed | Returns the number of rows processed since indexing started. | |
TableFulltextFailCount | Returns the number of rows that failed to index. | |
TableFulltextItemCount | Returns the number of rows successfully indexed. | |
TableFulltextKeyColumn | Returns the ID of the key index used by SQL Server FTS (normally the primary key). | |
TableFulltextPendingChanges | Returns the number of rows outstanding to be indexed. | |
TableFulltextPopulateStatus | Returns a number indicating the state of the population. | 1 = full population is in progress; 2 = incremental population is in progress; 3 = propagation of tracked changes is in progress; 45 = full-text indexing is throttled or paused = background update index is in progress, such as autochange tracking; and |
TableHasActiveFulltextIndex | Indicates whether a table has an active full-text index on it. | 1 = true and 0 = false |
Table 2 lists the full-text index properties for the COLUMNPROPERTY function.
Table 2. Full-Text Index Properties for the COLUMNPROPERTY Function
Property | Description | Values |
---|
IsFulltextIndexed | Indicates whether a column is full-text indexed. | 1 = true and 0 = false |
FullTextTypeColumn | Returns the ID of the document type column. | |
Table 3 lists the properties for the FULLTEXTCATALOGPROPERTY function.
Table 3. Properties for the FULLTEXTCATALOGPROPERTY
Property | Description | Values |
---|
AccentSensitivity | Indicates whether the catalog is accent sensitive. | 1 = true and 0 = false |
IndexSize | Returns the size of the full-text catalog. | |
ItemCount | Returns the number of items (rows) indexed in the catalog. | |
MergeStatus | Indicates whether a master merge is in progress. | 1 = true and 0 = false |
PopulateCompletionAge | Specifies how long ago the last population completed. | |
PopulateStatus | Returns the status of the population. | 0 = idle, 1 = full population in progress, 2 = paused, 3 = throttled, 4 = recovering, 5 = shut down, 6 = incremental population in progress, 7 = building index, 8 = disk is full, paused, and 9 = change tracking |
UniqueKeyCount | Returns the number of unique words indexed. | |
ResourceUsage | Returns a number indicating how aggressively SQL Server FTS is consolidating the catalog. | Ranges from 1 to 5 (the most aggressive); 3 is the default. |
IsFulltextInstalled | Indicates whether SQL Server FTS is installed. | 1 = true and 0 = false |
LoadOSResources | Indicates whether third-party word breakers are loaded. | 1 = true and 0 = false |
VerifySignature | Determines whether signatures of word breakers and language resources are checked. | 1 = true and 0 = false |
The following examples show how to query metadata functions using the full-text index properties:
SELECT OBJECTPROPERTY(object_id('Person.Contact'),
'TableFullTextBackgroundUpdateIndexOn')
select objectproperty(object_id('Person.Contact'),'TableFulltextChangeTrackingOn')
SELECT OBJECTPROPERTY(object_id('Person.Contact'),'TableFulltextKeyColumn')
SELECT OBJECTPROPERTY(object_id('Person.Contact'),'TableFulltextPendingChanges')
SELECT OBJECTPROPERTY(object_id('Person.Contact'),'TableFulltextPopulateStatus')
SELECT OBJECTPROPERTY(object_id('Person.Contact'),'TableHasActiveFulltextIndex')
SELECT COLUMNPROPERTY ( object_id('Person.Contact'),
'charcol' , 'IsFulltextIndexed' )
SELECT COLUMNPROPERTY ( object_id('Person.Contact'),
'VarbinaryColumn','FullTextTypeColumn' )
SELECT FULLTEXTCATALOGPROPERTY('MyCatalog','indexsize')
SELECT FULLTEXTCATALOGPROPERTY('MyCatalog','itemcount')
SELECT FULLTEXTCATALOGPROPERTY('MyCatalog','mergestatus')
SELECT FULLTEXTCATALOGPROPERTY('MyCatalog','populatecompletionage')
SELECT FULLTEXTCATALOGPROPERTY('MyCatalog','populatestatus')
SELECT FULLTEXTSERVICEPROPERTY('loadosresources')